package com.dfec.water.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dfec.framework.mybatis.core.page.PageParam;
import com.dfec.framework.mybatis.core.page.PageUtils;
import com.dfec.water.entity.YdbDeviceTypeEntity;
import com.dfec.water.entity.YdbWarnDeviceEntity;

import java.util.List;
import java.util.Map;


/**
 * 报警设备
 *
 * @author df
 * @date Thu Feb 06 11:10:12 CST 2025
 */
public interface YdbWarnDeviceService extends IService<YdbWarnDeviceEntity>  {

    /**
     * 分页查询
     * @param pageParam 入参
     * @return PageUtils
     * @author df
     * @date Thu Feb 06 11:10:12 CST 2025
     */
    PageUtils queryPage(PageParam<YdbWarnDeviceEntity> pageParam);


    /**
     * 不带分页查询
     *
     * @param YdbWarnDeviceEntity 入参
     * @return List<YdbWarnDeviceEntity>
     * @author df
     * @date Thu Feb 06 11:10:12 CST 2025
     */
    List<YdbWarnDeviceEntity> listAll(YdbWarnDeviceEntity YdbWarnDeviceEntity);


    /**
     * 获取预警项目
     *
     * @return
     */
    List<Map<String,Object>> getWarnProject();

    /**
     * 获取当前项目的报警设备
     *
     * @param projectId 项目
     * @return
     */
    List<YdbDeviceTypeEntity> getProjectWarnDevice(Long projectId);

    /**
     * 获取报警数据
     * @param deviceId
     * @return
     */
    Map<String,Object> getWarnData(Long deviceId);

    /**
     * 获取前10条数据
     * @return
     */
    List<Map<String,Object>> getTopTen();
}

